<?php
@session_start(); // start sessie

if(!empty($_POST['naam'])) {
  $_SESSION['naam'] = $_POST['naam']; // set session
}
?>
<form method="post" action="<?php  echo $_SERVER['PHP_SELF']; ?>">
Naam: <input name="naam" type="text" /> <br />
<input type="submit" value="Verstuur" />
</form>
<?php
echo "Sessie:<br /><pre>";
echo print_r($_SESSION); // print sessies
echo "</pre>";
?>